package com.mazsn.single;

/**
 * 懒汉模式的线程安全方式
 * @author mazhongshan
 *
 */
public class Singleton2 {

	private static Singleton2 instance;  
	
	private Singleton2 (){}  
	  
	public static synchronized  Singleton2 getInstance() {  
	 if (instance == null) {  
	        instance = new Singleton2();  
	 }  
	 return instance;  
   }  
	
}
